--[[
  module: UI

  This module contains functionality for scripts that only run on client.

  Should be installed in `ui` array of `project.json`.

  Availability: UI script::
  Access: Read-Only::
]]


--[[
  func: ScreenSize

  Get the screen size.

  Access: Read-Only::

  Notes:
    - The returned value is depends on client's screen resolution size.

  Returns:
    (*table / <~Virtual Table.size>*) The screen size.
]]
function UI.ScreenSize ()


--[[
  func: Signal

  Send an integer value to the server.

  Access: Read-Only::

  Notes:
    - This will raising <Game.Rule.OnPlayerSignal> event upon receiving the signal.

  Parameters:
    signal - (*int*) The value to send.
]]
function UI.Signal (signal)


--[[
  func: StopPlayerControl

  Enable/Disable client keyboard & mouse controls.

  Access: Read-Only::

  Notes:
    - The effect is holds up from 0 to 60 seconds.
    - It will be reset when the client is killed.

  Parameters:
    stop - (*bool*) Input value (true = Disable)(false = Enable).
]]
function UI.StopPlayerControl (stop)


--[[
  func: PlayerIndex

  Get the client's entity index.

  Access: Read-Only::

  Returns:
    (*int*) The client's entity index.

  See Also:
    - <Game.Entity.index>
]]
function UI.PlayerIndex ()


--[[
  func: GetTime

  Get the game time.

  Access: Read-Only::

  Notes:
    - The returned value is same as <UI.Event.OnUpdate>'s `time` argument.

  Returns:
    (*number*) The game time.

  See Also:
    - <Game.GetTime>
    - <UI.Event.OnUpdate>
]]
function UI.GetTime ()


--[[
  enum: KEY

  --- Lua
  UI.KEY
  ---

  Keyboard & mouse keys that can be recorded on input events.

  Data Type: table::
  Access: Read-Only::

  NUM1   - (*int*) Keyboard: '1' button.
  NUM2   - (*int*) Keyboard: '2' button.
  NUM3   - (*int*) Keyboard: '3' button.
  NUM4   - (*int*) Keyboard: '4' button.
  NUM5   - (*int*) Keyboard: '5' button.
  NUM6   - (*int*) Keyboard: '6' button.
  NUM7   - (*int*) Keyboard: '7' button.
  NUM8   - (*int*) Keyboard: '8' button.
  NUM9   - (*int*) Keyboard: '9' button.
  NUM0   - (*int*) Keyboard: '0' button.
  A      - (*int*) Keyboard: 'A' button.
  B      - (*int*) Keyboard: 'B' button.
  C      - (*int*) Keyboard: 'C' button.
  D      - (*int*) Keyboard: 'D' button.
  E      - (*int*) Keyboard: 'E' button.
  F      - (*int*) Keyboard: 'F' button.
  G      - (*int*) Keyboard: 'G' button.
  H      - (*int*) Keyboard: 'H' button.
  I      - (*int*) Keyboard: 'I' button.
  J      - (*int*) Keyboard: 'J' button.
  K      - (*int*) Keyboard: 'K' button.
  L      - (*int*) Keyboard: 'L' button.
  M      - (*int*) Keyboard: 'M' button.
  N      - (*int*) Keyboard: 'N' button.
  O      - (*int*) Keyboard: 'O' button.
  P      - (*int*) Keyboard: 'P' button.
  Q      - (*int*) Keyboard: 'Q' button.
  R      - (*int*) Keyboard: 'R' button.
  S      - (*int*) Keyboard: 'S' button.
  T      - (*int*) Keyboard: 'T' button.
  U      - (*int*) Keyboard: 'U' button.
  V      - (*int*) Keyboard: 'V' button.
  W      - (*int*) Keyboard: 'W' button.
  X      - (*int*) Keyboard: 'X' button.
  Y      - (*int*) Keyboard: 'Y' button.
  Z      - (*int*) Keyboard: 'Z' button.
  SHIFT  - (*int*) Keyboard: 'SHIFT' button.
  SPACE  - (*int*) Keyboard: 'SPACE' button.
  ENTER  - (*int*) Keyboard: 'ENTER' button.
  UP     - (*int*) Keyboard: 'Arrow UP' button.
  DOWN   - (*int*) Keyboard: 'Arrow DOWN' button.
  LEFT   - (*int*) Keyboard: 'Arrow LEFT' button.
  RIGHT  - (*int*) Keyboard: 'Arrow RIGHT' button.
  MOUSE1 - (*int*) Mouse: 'Left Click' button.
  MOUSE2 - (*int*) Mouse: 'Right Click' button.
]]

